package com.mall.mymall.dao.dto;

import java.util.Objects;

public class AdminDto {
    // 用户名

    private Integer adminId;
    private String username;
    // 密码
    private String password;

    private String nickname;

    private String avatarUrl;

    private Integer roleId;

    public Integer getManageId() {
        return manageId;
    }

    public void setManageId(Integer manageId) {
        this.manageId = manageId;
    }

    // 权限管理的操作人标识符
    private Integer manageId;

    public Integer getAdminId() {
        return adminId;
    }

    public void setAdminId(Integer adminId) {
        this.adminId = adminId;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public AdminDto(Integer adminId, String username, String password, String nickname, String avatarUrl, Integer roleId) {
        this.adminId = adminId;
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.avatarUrl = avatarUrl;
        this.roleId = roleId;

    }

    public AdminDto(Integer adminId, String username, String password, String nickname, String avatarUrl, Integer roleId, Integer manageId) {
        this.adminId = adminId;
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.avatarUrl = avatarUrl;
        this.roleId = roleId;
        this.manageId = manageId;
    }

    public AdminDto() {
    }

    // getter和setter方法
    public String getUsername() {
        return username;
    }

    // setter方法
    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AdminDto adminDto = (AdminDto) o;
        return Objects.equals(username, adminDto.username) && Objects.equals(password, adminDto.password) && Objects.equals(nickname, adminDto.nickname) && Objects.equals(avatarUrl, adminDto.avatarUrl) && Objects.equals(roleId, adminDto.roleId) && Objects.equals(adminId, adminDto.adminId) && Objects.equals(manageId, adminDto.manageId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(username, password, nickname, avatarUrl, roleId, adminId);
    }

    @Override
    public String toString() {
        return "AdminDto{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                ", avatarUrl='" + avatarUrl + '\'' +
                ", roleId='" + roleId + '\'' +
                ", manageId='" + manageId + '\'' +
                ", adminId=" + adminId +
                '}';
    }
}
